Skip to content

v5.0.x: mpool/hugepage: fix sizing of hugepages #13219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025

Conversation

jsquyres
Copy link
Member

@jsquyres jsquyres commented Apr 29, 2025

Really old code was still preferring to parse Linux's /proc/mounts to find the size of hugepages instead of just using statfs() or statvfs() to get the size directly.

Thanks to @wangshaochuang for noticing that the parsing of /proc/mounts wasn't even quite right in modern Linux systems, we have changed the preference in the code to use statfs() / statvfs() if available (which it almost certainly will be), and only fall back to parsing /proc/mounts on really, really, really old systems (where the /proc/mounts parsing will likely be correct).

(cherry picked from commit 8f34fb8)

Refs #13214

Really old code was still preferring to parse Linux's /proc/mounts to
find the size of hugepages instead of just using statfs() or statvfs()
to get the size directly.

Thanks to @wangshaochuang for noticing that the parsing of
/proc/mounts wasn't even quite right in modern Linux systems, we have
changed the preference in the code to use statfs() / statvfs() if
available (which it almost certainly will be), and only fall back to
parsing /proc/mounts on really, really, really old systems (where the
/proc/mounts parsing will likely be correct).

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 8f34fb8)
@jsquyres jsquyres requested a review from bosilca April 29, 2025 13:12
@github-actions github-actions bot added this to the v5.0.8 milestone Apr 29, 2025
@janjust janjust merged commit 48805a2 into open-mpi:v5.0.x May 2, 2025
18 checks passed
@jsquyres jsquyres deleted the pr/v5.0.x/hugepage-sizing branch May 2, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants